Copyright: JustOne Copyright ® '95, '96 by S.L.Keyser


Contents
  JustOne     v1.1

Overview

JustOne is a component which when added to your application, makes it easy to limit the number of your app's instances to just one.  If a second instance of your application is started, JustOne brings the first instance to the front, gives it the focus, and then shuts down the second instance.  If the first instance of your application is minimzed to an icon when the second instance starts, JustOne will even 'restore' the first instance to it's normal window state.

Using JustOne

Installing the JustOne component

JustOne is Freeware

Contacting the author

Version info


Using JustOne
Using JustOne  v1.1	see also

JustOne is simple to use.

Simply drag the JustOne component from your component palette and drop it onto your startup form.  That's all there is to it.

When you run your application, the JustOne constructor will go out and look to see if a previous instance of your application is running.  If so, the first instance of your app is brought to the front and the second instance is halted.

If your application's first instance was minimized to an icon, it will be 'restored' as it is brought to the front.

If you are upgrading from v1.0...

If you load an application into the Delphi IDE, and that application is already using JustOne v1.0, you may be prompted with a message dialog box indicating there are missing properties.  This is okay... just click the 'IGNORE' button.

Also, you will need to remove the code from your application which caused JustOne to execute under v1.0.  This is usually in your Form.Create procedure. Remove the line you added which probably looked like JustOne1.Execute;.


Installation
Installation	see also

JustOne is installed into your component pallette like any other component.  As individual preferences vary, you may place the following files where you generally keep similar file types.

File	Description

JUSTONE.PAS	The source code for JustOne.  You can use this to compile your own JUSTONE.DCU file.

JUSTONE.DCR	This is the resource file which contains the JustOne icon which appears in your component palette and on your forms.

JUSTONE.DCU	This is the compiled unit.  When you 'ADD' to your component palette, this unit is source of what gets added to your component library (COMPLIB.DCL).

JUSTONE.HLP	This is a Windows help file.

JUSTONE.KWF	This is a key word file which enables you to access the JustOne Help file by pressing the F1 key from within Delphi.

For detailed help on installing components, please refer to page 68 of your Delphi User's Guide.  The section, Customizing the Delphi Visual Component Library (VCL)  explains this process.

For detailed help on installing the keyword file, please refer to page 80 of your Delphi Component Writer's Guide.  The section, Merging the Help indexes explains this process.


Freeware
JustOne is Freeware	see also

JustOne is provided as Freeware.  Feel free to use it as you wish, but you do so at your own risk.

Credit where credit is due

Some of the source code for this component came from a Help file downloaded from the Delphi Forum on CompuServe (LDELPHI.ZIP).  The Help file, called Lloyd's Delphi Notes (Lloyd Linklater), lists many tips on using Delphi.  One of the items addressed is how to add code to your application which will allow just one instance to run.  In that Help file, the code is further credited to Pat Ritchey.  My contribution was simply to place the code into a reusable component.

Additional Thanks

Additional thanks go to Russ Chinoy (RC Software) for sharing his enhancemets which are included in this release.


author
Contacting the Author	see also

Please feel free to share your enhancements to JustOne.  It is a simple component with a simple task, but as I have seen, there is always a better way and always something to learn.

Send your comments and ideas to:

Location	Address

CompuServe address:	71214,3117

Internet e-mail:	71214.3117@compuserve.com

Enjoy,

Steve Keyser ( Las Vegas )


version info
Version Info	see also

Version	Description

v1.1	Streamlined the use of the component.  It is no longer necessary to 'EXECUTE' the component from your code to make it work.  Added a help file and a key word file.  Eliminated the 'AllowMultInst' property and the 'Execute' property.  Added an 'About' button property which shows in the Object Browser.  January 14, 1996

Backward compatibility

v1.0	Initial release.  October 1995


PG7
Contents

Installing JustOne

JustOne is Freeware

Contacting the Author

Version Info


PG8
Contents

Using JustOne

JustOne is Freeware

Contacting the Author

Version Info


PG9
Contents

Using JustOne

Installing JustOne

Contacting the Author

Version Info


PG10
Contents

Using JustOne

Installing JustOne

JustOne is Freeware

Version Info


PG11
Contents

Using JustOne

Installing JustOne

JustOne is Freeware

Contacting the Author